package a66weding.com.jiehuntong.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.GridView;

/**
 * Created by Administrator on 2016/6/22.
 * scrollview中嵌套gridview时需要自定义gridview
 */
public class MyGridView2 extends GridView{
        public MyGridView2(Context context, AttributeSet attrs) {
            super(context, attrs);
        }
        public MyGridView2(Context context) {
            super(context);
        }
        public MyGridView2(Context context, AttributeSet attrs, int defStyle) {
            super(context, attrs, defStyle);
        }
        @Override
        public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
            int expandSpec = View.MeasureSpec.makeMeasureSpec(
                    Integer.MAX_VALUE >> 2, View.MeasureSpec.AT_MOST);
            super.onMeasure(widthMeasureSpec, expandSpec);
        }
}
